fix: default session keep_alive to 5 minutes#780
Conversation
|
Was the intention that it would log as ERROR? I am seeing:
The good news is that I didn't realize this was happening with my servers (session worker zombies) and hadn't overridden the default of None, but isn't this more of a client error (the client left without saying goodbye)? Perhaps this is more of a WARN, or maybe INFO (in the case the worker was terminated because the client dropped silently). ERROR generates questions, and this is normal behavior. I didn't want to open up a new issue before understanding if this was the intent. There is a secondary error that shows up as well, that is simply because of the first:
|
Motivation and Context
When an HTTP/2 connection silently drops (e.g., an Envoy sidecar sending RST_STREAM with NO_ERROR), the
LocalSessionManagerstill holds the session handle, keeping the worker's event channel open. The session worker never detects the disconnect and runs indefinitely as a zombie. Over time these zombies accumulate and can block servers that iterate over sessions during notifications, eventually causing the server to become unresponsive.This changes the default
SessionConfig::keep_alivefromNone(infinite) to 5 minutes. After 5 minutes of inactivity, the session worker exits, the transport closes, and downstream servers can detect the peer as closed. Users can still setkeep_alive: Noneto restore the old behavior if needed.How Has This Been Tested?
SessionConfig::default()value:LocalSessionManager::default(), initialize a session via curl, Ctrl+C the curl (creating a zombie), and wait 5 minutes. The server logs should show"keep alive timeout after 300000ms"and the session worker should exit.Breaking Changes
None. No API signatures changed.
Types of changes
Checklist
Additional context